#ifndef BINARYSEARCHTREE_H
#define BINARYSEARCHTREE_H
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
typedef int Element;
typedef struct bsNode {
    Element data;
    struct bsNode *left;
    struct bsNode *right;
}BSNode;

typedef struct {
    BSNode *root;
    int count;
}BSTree;

BSTree *createBSTree();
void releaseBSTree(BSTree *tree);
void visitBSTree(BSNode *node);
void inOrderBSTree(BSTree *tree);
int heightBSNode(BSNode *node);

void insertBSTreeRecur(BSTree *tree, Element e);
BSNode *searchBSTree(BSTree *tree, Element e);
void deleteBSTreeRecur(BSTree *tree, Element e);

void insertBSTreeNoRecur(BSTree *tree, Element e);
void deleteBSTreeNoRecur(BSTree *tree,Element e);

#endif //BINARYSEARCHTREE_H
